Optimizations of CLP ( < Lin )
نویسنده
چکیده
This paper describes the design and implementation of an optimizing compiler for CLP(< Lin), a constraint logic programming language over linear real constraints. The compiler performs a number of source to source optimizations which aim at replacing constraint solving, the basic operation of the language, by assignments (when, at runtime, all but one variables have a xed value) and tests (when, at runtime, all variables have a xed value) These optimizations follow the 3R's methodology which consists of reening, reordering, and removing constraints. The compiler uses abstract interpretation to decide when and how to perform the optimizations. The resulting system (40,000 lines of C, 10,000 of which concern the optimizations) has been evaluated experimentally. Our preliminary results indicate that substantial (often asymptotic) speedups can be obtained. Most of these speedups can be made arbitrary large, since they depend on the input size. This is, to our knowledge, the rst operational compiler for CLP(< Lin) with these functionalities and the rst implementation of reordering and constraint removal. It is also a convincing demonstration that abstract interpretation can be used to produce dramatic speedups for CLP(< Lin) programs.
منابع مشابه
Some Global Compile-Time Optimizations for CLP(R)
Generation of eecient code for constraint logic programming (CLP) languages poses new problems. It is not yet clear which techniques from Prolog compilation will be important nor what sort of domain speciic techniques can be developed. As a case study, we describe and evaluate four global optimizations for use in the compilation of the language CLP(R). The rst three are variants of optimization...
متن کاملEffectiveness of Optimizing Compilation for CLP(R)
Constraint Logic Programming (CLP) languages extend logic programming by allowing constraints from diierent domains such as real numbers or Boolean functions. They have proved to be ideal for expressing problems that require interactive mathematical modelling and complex combinatorial optimization problems. However, CLP languages have mainly been considered as research systems, useful for rapid...
متن کاملCompiling Constraints in clp(FD)
We present the clp(FD) system: a Constraint Logic Programming language with finite domain constraints. We detail its implementation and present an abstract instruction set for the constraint solver that can be smoothly integrated into the WAM architecture. It is based on the use of a single primitive constraintX in r that embeds the core propagation mechanism. Complex user constraints such as l...
متن کاملIndependence in Constraint Logic Programs
Studying independence of literals, variables, and substitutions has proven very useful in the context of logic programming (LP). Here we study independence in the broader context of constraint logic programming (CLP). We show that a naive extrapolation of the LP definitions of independence to CLP is unsatisfactory (in fact, wrong) for two reasons. First, because interaction between variables th...
متن کاملGeneralized Redundant Inequalities in CLP(R)
Future redundant inequalities in a CLP(R) program are those that are guaranteed to be subsumed after no more than one subsequent procedure call, usually in the context of a recursive procedure. Inequalities must generally be tested for consistency with the collected constraint set and then added to it. However, future redundant inequalities need only be tested for consistency, thus resulting in...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1995